<!-- vue3学习 -->
<template>
    <h1>{{ age }}</h1>
    <button @click="setupChange"> setup语法糖改变 </button>
    {{ $attrs.dataStatus }}

</template>

<script setup>
    import { ref, useSlots, useAttrs } from 'vue'
    // 获取props
    let props = defineProps({
        age: Number
    }) 
    let emits = defineEmits(['father-change'])
    let setupChange = () =>{
        emits('father-change', props.age + 2)
    }
    let setupchild = 100;
    defineExpose({
        setupchild
    });

</script>


<style scoped>


</style>